Carbon


PBWriteAsync

Header: Devices.h Carbon status: Modified

Writes any number of bytes to an open file.

OSErr PBWriteAsync (
    ParmBlkPtr paramBlock
);
Parameter descriptions
paramBlock

A pointer to a basic File Manager parameter block.

function result

A result code.

DISCUSSION

The relevant fields of the parameter block are:

The PBWriteAsync function takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to write them to the open file whose access path is specified by ioRefNum. The position of the mark is specified by ioPosMode and ioPosOffset. If the write operation completes successfully, PBWriteAsync moves the file mark to the byte following the last byte written and returns noErr.

If you try to write past the logical end-of-file, PBWriteAsync moves the logical end-of-file. If you try to write past the physical end-of-file, PBWriteAsync adds one or more clumps to the file and moves the physical end-of-file accordingly.

AVAILABILITY

Modified in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.

CARBON NOTES

This function is only supported for writing to open files.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)